import Vue from "vue"
import VueRouter from 'vue-router'

// 安装插件
Vue.use(VueRouter)



// 2.配置路由信息
const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/category',
    component: Category
  },
  {
    path: '/cart',
    component: Cart
  },
  {
    path: '/profile',
    component: Profile
  },
  {
    path: '/detail',
    component: Detail
  }
]
//创建router 



const router =new VueRouter({
	routes,
	mode:'history'
})

export default router